Download the zipfile from https://github.com/dlab-geo/geocoding
unzip the files
start RStudio
start a new R script file
set your working directory to the location of the unzipped files
Fall 2018
Download the zipfile from https://github.com/dlab-geo/geocoding
unzip the files
start RStudio
start a new R script file
set your working directory to the location of the unzipped files
About me…
Questions for you…
Obtaining geographic coordinates for named places, street addresses, or zip codes.

Named places, codes or addresses
Display locations on a map
Link data by location
File of Input locations
A Geocoder
Output file
What types of data are available for geocoding
Where do you think the point for 275 5th St NE would be located?

Where do you think the point for 275 5th St NE would be located?

Addresses would match to centroid of parcel or rooftop


Directions on your phone
Search a place on Google Maps
Many online tools will geocode "on the backend" but not give you access to the output.
SF Landmarks worksheetSF Landmarks worksheet
IMPORT and import the CSV file you just downloadedI will just DEMO with Berkeley Grafitti worksheet data

When I have 1-10 locations to geocode…
DEMO
When I have 10 - 1,000 US addresses & feel good about taxpayer supported tools…
Open the Census Geocoding website
Select Find Locations Using...OPTION > Address Batch
Download the sample CSV file from the Census website to see the needed file format
View the Orig_Grafitti_street_addresses worksheet in the Sample Geocoding Data Google Sheet
Copy & past the Grafitti to a new sheet and get it into the required format
Download this revised worksheet to CSV
Select the downloaded file to geocode the addresses using the Census geocoder
Click Get Results and then review the output
When I have 1,000 - 10,000,000 and want a high level of control and output quality…
They are very good for geocoding and other geo tasks!
They are free to UCB Community via Campus Site License.


Pros
Cons
Pros
Available in the D-Lab
Cons
Download the New_Grafitti_street_addresses worksheet as CSV
Login to cal.maps.arcgis.com
Click on Sign in to University of CA Berkeley using CALNET Account.

Content
Add Item > From My Computer



GEOCODED Feature Layer (hosted)
GEOCODED Feature Layer (hosted)
You need to export the GEOCODED feature layer to a CSV file and then download that CSV file to save the geocoded data locally.
Click on the feature layer to do this…



Now you can download 

You can geocode 1- 50,000 addresses, place names or geocodes without problem in AGOL. If you have more than that you may want to think about your 5,000 ESRI credits.
You may need your credits for other work you do on AGOL.
You may need to allow for time to request and receive more credits for big geocoding jobs.
Use ArcGIS Desktop with a locally installed reference database if you have a huge number of addresses to geocode.
DEMO
Write a script (short computer program) to geocode your data.
API: Application Programming Interface
And many others…
Prices and terms of use subject to change on freemium services!
View the OpenStreetMap Nominatim Geocoding Service Documentation
The format of a geocoding search request:
Try a geocoding search request in a web browser
https://nominatim.openstreetmap.org/search?q=Barrows Hall, Berkeley CA
Click on the details button in upper left when you get results
Almost all Geocoding APIs ask that you register for an API key
You use that key in your requests to use the service.
Some Freemium services ask for a credit card even if there is a free level of service.
Most folks use the geopy package because it provides a consistent interface to a number of different geocoding APIs.
DEMO if time using Google Collaboratory
More of a geocoding API specific landscape of packages
ggmap package for the Google Geocoding API
I have some R geocoding scripts on github you can review if you want to check them out.
Google Doc to guide you through geocoding with ESRI ArcGIS Online, Desktop or World Geocoding Service API
Many of the images used in this slidedeck were download from https://unsplash.com/, a great resource for beautiful free photos. See the R markdown file for photographer credits.